import javax.security.sasl.SaslClient;
import java.util.Arrays;
import java.util.Scanner;


public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count = 0;
        while(n!=0) {
            n/=10;
            count++;
        }
        if(count<6) System.out.println(count + "digits");
        else System.out.println("error");
    }
}


//
//public class Main {
//    public static void main(String[] args) {
//        Scanner scanner = new Scanner(System.in);
//        while(scanner.hasNextInt()) {
//            int[] nums = new int[3];
//            int a = scanner.nextInt();
//            int b = scanner.nextInt();
//            int c = scanner.nextInt();
//            nums[0] = a;
//            nums[1] = b;
//            nums[2] = c;
//            Arrays.sort(nums);
//            if(nums[0] + nums[1] > nums[2]) {
//                System.out.printf("%d,%d,%dcan form a triangle!",a,b,c);
//            }else {
//                System.out.printf("%d,%d,%dcannot form a triangle!",a,b,c);
//            }
//        }
//    }
//}
